package QianFeng06.ComparableDemo;

import java.util.Comparator;
/**
 * Comparator接口
 **/
public class DogComparator implements Comparator<Dog> {
    public int compare(Dog o1, Dog o2) {
        return o1.getAge() - o2.getAge();
    }
}
